<!-- 头像 -->
<template>
  <img
  class="avatar-container"
    :src="props.url"
    :style="{
      width: props.size + 'px',
      height: props.size + 'px',
    }"
  />
</template>

<script setup>
const props = defineProps({
  url: {
    type: String, // url属性必须是一个字符串
    default: ''
  },
  size: {
    type: Number,
    default: 150,
  },
});
</script>

<style lang="less" scoped>
.avatar-container{
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
</style>